
				<h2 class="title">用户管理</h2>






<style scoped>
	.paging{
		width:100%;
		text-align: center;
	}
	.pages{
		display: inline-block;
	}
	.listBtns {
		margin-bottom: 20px;
	}
	
	
	
	.hanLogBtn {
		margin-bottom: 20px;
	}
	
	.spt {
		line-height: 35px;
	}
	
	.clearfix::after {
		content: "";
		clear: both;
		width: 100%;
		height: 0;
		display: block;
	}
	
	.layui-date>input {
		width: 100px;
		margin: 0 10px;
	}
	
	.fl {
		float: left;
	}
	
	.hanLogInfo-table {
		font-size: 12px;
		margin-top: 30px;
		padding-top: 30px;
	}
	
	.hanLogInfo-table tr>th {
		text-align: center;
		font-size: 12px;
	}
	
	.hanLogInfo-table tr>td {
		text-align: center;
		font-size: 12px;
	}
	
	.block {
		display: block;
	}
	
	.hanLogTop-btn {
		width: 100%;
		text-align: center;
	}
	
	.hanLogInfo {
		margin-top: 20px;
		margin-bottom: 30px;
	}
	
	.hanLogTop-btn button {
		display: inline-block;
		width: 200px;
		border-radius: 5px;
	}
	
	.title {
		/*margin-top: 30px;
		margin-left: 30px;*/
		margin: 30px 0 0 30px;
	}
	
	.save-warp {
		width: 100%;
		text-align: center;
		margin-top: 20px;
	}
	
	.save-warp button {
		display: inline-block;
		width: 160px;
	}
	
	.hanLog-top {
		display: flex;
		justify-content: space-between;
	}
	
	.hanLog-table {
		background-color: rgba(0, 0, 0, 0);
	}
</style>



<script>
	layui.use('laypage', function() {
		var laypage = layui.laypage;

		//执行一个laypage实例
		laypage.render({
			elem: 'pages1' //注意，这里的 test1 是 ID，不用加 # 号
				,
			count: 50 //数据总数，从服务端得到
				,
			limits: [10, 20, 50]
		});
	});
</script>

<div class="layui-card-body">
          <div class="layui-card-header">
            <a href="#/member/all/edit" class="layui-btn layui-btn-xs layui-btn-danger">
              <i class="layui-icon">&#xe640;</i>
              <span>批量删除</span>
            </a>
            <a href="#/member/all/edit" class="layui-btn layui-btn-xs layui-btn-danger">
              <i class="layui-icon">&#xe640;</i>
              <span>按操作日期删除</span>
            </a>
            
            <a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-primary" id="search_hash">
              <i class="layui-icon">&#xe615;</i>
            </a>
          </div>
          <div class="layui-card-body">
            <table id="demo_hash" lay-filter="test"></table>
            <script type="text/html" id="barDemo_hash">
              <a class="layui-btn layui-btn-xs" lay-event="detail">查看</a>
              <!-- <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a> -->
              <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
            </script>
          </div>
        </div>
      
      
      
      
      </div>
    </div>
  </div>
</div>

<script type="text/html" id="search_tpl_hash">
  <form class="layui-form" action="">
    <div class="layui-form-item">
      <label class="layui-form-label">操作者</label>
      <div class="layui-input-block">
        <input type="text" name="title" placeholder="" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">操作IP</label>
      <div class="layui-input-block">
        <input type="text" name="title" placeholder="" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">操作日期</label>
      <div class="layui-input-block">
        <div class="date clearfix">
			<div class="layui-date fl"> 
			  <input type="text" class="layui-input from" id="from">
			</div>
			<div class="fl spt">-</div>
			<div class="layui-date fl"> 
			  <input type="text" class="layui-input to" id="toDate">
			</div>
		</div>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit lay-filter="formDemo_hash"><i class="layui-icon">&#xe615;</i> 搜索</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
      </div>
    </div>
  </form>
</script>

<script>
  layui.use(['jquery', 'mockjs', 'table', 'sidebar', 'form'], function () {
    var $ = layui.jquery,
      layer = layui.layer,
      table = layui.table,
      sidebar = layui.sidebar,
      form = layui.form;
    // 注入mock
    layui.mockjs.inject({
      'POST /demo/table/user': {
        code: 0,
        msg: "xxx",
        count: 1000,
        'data|20': [{
          'id|+1': 1,
          username: '@name',
          sex: '@boolean',
          city: '@city',
          sign: '@csentence',
          experience: '@integer',
          score: '@integer',
          classify: '@word',
          wealth: '@integer',
          auth: '@boolean'
        }]
      }
    });
    //第一个实例
    table.render({
      method: 'post',
      // size: 'sm',
      limit: 10,
      elem: '#demo_hash',
      height: 'full-235',
      url: '/demo/table/user', //数据接口
      page: true, //开启分页
      cols: [
        [ //表头
          {
            field: 'id',
            title: 'ID',
            width: 150,
            sort: true,
            fixed: 'left'
          }, {
            field: 'username',
            title: '操作者',
            width: 200
          }, {
            field: '',
            title: '操作页面',
            width: 200
          }, {
            field: 'dep',
            title: '操作日期',
            width: 200
          }, {
            field: 'handleRec',
            title: '操作记录',
            width: 200
          }, {
            field: 'handleIP',
            title: '操作IP',
            width: 200
          },
          {
            fixed: 'right',
            width: 180,
            align: 'center',
            toolbar: '#barDemo_hash'
          }
        ]
      ]
    });

    $('#search_hash').on('click', function () {
      var that = this;
      // console.log($('#search_tpl_hash').html());
      sidebar.render({
        elem: that,
        content: $('#search_tpl_hash').html(),
        title: '搜索',
        shade: true,
        // shadeClose:false,
        // direction: 'left'
        // dynamicRender: false,
        // url: 'views/member/all/search.html',
        width: '500px', //可以设置百分比和px
        done: function () {
          console.log('ccc');
          form.render();

          //监听提交
          form.on('submit(formDemo_hash)', function (data) {
            // layer.msg(JSON.stringify(data.field));
            table.reload('demo_hash', {
              where: data.field
            });
            return false;
          });
          layui.use('laydate', function() {
		var laydate = layui.laydate;

		//执行一个laydate实例
		laydate.render({
			elem: '#from' //指定元素
		});

	});
	layui.use('laydate', function() {
		var laydate1 = layui.laydate;

		//执行一个laydate实例
		laydate1.render({
			elem: '#toDate' //指定元素
		});

	});
          
        }
      });
    });
  });
  
  
  
</script>

<!--<script>
	layui.use('laydate', function() {
		var laydate = layui.laydate;

		//执行一个laydate实例
		laydate.render({
			elem: '#from' //指定元素
		});

	});
	layui.use('laydate', function() {
		var laydate1 = layui.laydate;

		//执行一个laydate实例
		laydate1.render({
			elem: '#to' //指定元素
		});

	});
</script>-->
